package com.lemon.smartsafety.ui.activity.hidden;

import android.support.v4.app.Fragment;
import android.view.KeyEvent;

import com.lemon.smartsafety.R;
import com.lemon.smartsafety.app.AppManager;
import com.lemon.smartsafety.entity.event.base.AppEvent;
import com.lemon.smartsafetynew.ui.activity.base.BaseFragmentActivity;
import com.lemon.smartsafety.ui.fragment.hidden.HiddenListFragment;

import org.greenrobot.eventbus.Subscribe;

/**
 * Created by Cooliean on 16/3/20.
 * 隐患一览
 */
public class HiddenListActivity extends BaseFragmentActivity {
    @Override
    public Fragment getFragment() {
        return HiddenListFragment.newInstance();
    }


    @Subscribe
    public void onEventMainThread(AppEvent event) {
    }


    @Override
    protected void initTitle() {
        this.setBarTitle(R.string.hidden_list_title);
    }




    @Override
    protected void callFinish() {
        AppManager.getAppManager().finishActivity(HiddenListActivity.class);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            callFinish();
        }
        return super.onKeyDown(keyCode, event);
    }
}
